//
//  InputBox.m
//  ArtCircle
//
//  Created by sunbin on 2017/5/18.
//  Copyright © 2017年 Quanli. All rights reserved.
//

#import "InputBox.h"



@interface InputBox()


@end

@implementation InputBox
{

}

- (OneInputBox *)one{
    if (!_one) {
        _one = [OneInputBox oneInputBoxHandle];
        
        [self addSubview:_one];
    }
    return _one;
}

- (TwoInputBox *)two {
    if (!_two) {
        _two = [TwoInputBox twoInputBoxHandle];
        
        [self addSubview:_two];
    }
    
    return _two;
}

- (ThreeInputBox *)three {
    if (!_three) {
        _three = [ThreeInputBox threeInputBoxHandle];
        
        [self addSubview:_three];
    }
    
    return _three;
}


- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    
    
}


- (void)setTy:(InputBoxType)ty {
    _ty = ty;

    WEAKSELF;
    switch (_ty) {
        case InputBoxTypeOne:
        {
            [self.one mas_makeConstraints:^(MASConstraintMaker *make) {
                make.edges.equalTo(weakSelf).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
                
            }];
        }
            break;
        case InputBoxTypeTwo:
        {
            [self.two mas_makeConstraints:^(MASConstraintMaker *make) {
                make.edges.equalTo(weakSelf).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
            }];
        }
            
            break;
            
        case InputBoxTypeThree:
        {
            [self.three mas_makeConstraints:^(MASConstraintMaker *make) {
                make.edges.equalTo(weakSelf).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
            }];
        }
            
            break;
        default:
            break;
    }
    

    
    


}
- (void)layoutSublayersOfLayer:(CALayer *)layer{
    [super layoutSublayersOfLayer:layer];
    
}


@end
